package com.sjx.boundarycallback.ui;

import android.graphics.Color;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;


import com.sjx.boundarycallback.R;
import com.sjx.boundarycallback.databinding.ActivityPublishBinding;
import com.sjx.boundarycallback.model.PieChartBean;

import java.util.ArrayList;


public class PublishActivity extends AppCompatActivity {

    private static final String TAG = "PublishActivity";
    private ActivityPublishBinding mBinding;


    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBinding = DataBindingUtil.setContentView(this, R.layout.activity_publish);
        initData();
    }

    private void initData() {
        ArrayList<PieChartBean> arrayList = new ArrayList<>();
        arrayList.add(new PieChartBean(Color.RED, 30));
        arrayList.add(new PieChartBean(Color.WHITE, 60));
        arrayList.add(new PieChartBean(Color.BLACK, 50));
        arrayList.add(new PieChartBean(Color.GREEN, 40));
        arrayList.add(new PieChartBean(Color.BLUE, 120));
        arrayList.add(new PieChartBean(Color.YELLOW, 60));
        mBinding.arcCircleView.setData(arrayList);
        mBinding.arcCircleView.setProgressAnimation(1 * 1000);
    }

}
